
<div>
	<? echo $this->Html->image('dhbw-logo.png') ?>
</div>

<div>
	<div style="float: left">Duale Hochschule Mannheim</div>


	<div style="float: right">
	<?php

	$out = 'Herzlich Willkommen';
	if($this->Session->check('Auth.User')){
		$uname = $this->Session->read('Auth.User.first_name');
		$uname .= ' '.$this->Session->read('Auth.User.family_name');
		$out = ' Willkommen '.$uname;
			
	}
	echo $out.' <span>|</span> ';

	?>

		
		
		
		<?php
		$urlParams = $this->params['url'];
		$len = sizeof($urlParams);
		$target = '?';
		if($len > 1){
			$newArray = array();
			foreach($urlParams as $key => $value){
				if($key != 'url'){
					$newArray[] = $key.'='.$value;
				}
			}
			$target .= implode('&',$newArray );
			$target .= '&print';
		}else{
			$target .= 'print';
		}
		?>
		<a href="<?php echo $target ?>" target="_new">Druck-Ansicht</a> <span>|</span> 
		
		<?php  

			$controller = $this->params['controller'];
			$action = $this->params['action'];
			$action =  'index/'.$controller.'/'.$action;
			
			echo $this->Html->link('Hilfe',array('controller'=>'help','action'=>$action));
		?>
		<span>|</span>
		
		<?php
			if($this->Session->check('Auth.User')){
				echo $this->Html->link('Abmelden',array('controller'=>'users','action'=>'logout'));
			} else{
				echo $this->Html->link('Anmelden',array('controller'=>'users','action'=>'login'));
			}

		?>
			
			
			
			
			
	</div>
</div>


